package com.qf.ssm.mapper;

import com.qf.ssm.entity.FrontCategoryFirst;
import com.qf.ssm.entity.FrontCategoryTwo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface FrontCategoryTwoMapper {
    /**
     * delete by primary key
     *
     * @param fctId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer fctId);

    /**
     * 新建二级类目
     *
     */
    int insert(@Param("record") FrontCategoryTwo record);

    int insertOrUpdate(FrontCategoryTwo record);

    int insertOrUpdateSelective(FrontCategoryTwo record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(FrontCategoryTwo record);

    /**
     * select by primary key
     *
     * @param fctId primary key
     * @return object by primary key
     */
    FrontCategoryTwo selectByPrimaryKey(Integer fctId);

    /**
     *
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(FrontCategoryTwo record);

    /**
     *通过主键编辑二级类目
     */
    int updateByPrimaryKey(FrontCategoryTwo record);


    int updateBatch(List<FrontCategoryTwo> list);

    int batchInsert(@Param("list") List<FrontCategoryTwo> list);

    /**
     * 通过分类名称和时间范围查询信息
     */
    List<FrontCategoryTwo> selectNameAndDate(@Param("fcfName") String fcfName, @Param("frontDate") Date frontDate, @Param("afterDate") Date afterDate);
}